import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/Login'
import Menu from '../components/Menu'
import demo1 from '../components/sub/demo1'
import demo2 from '../components/sub/demo2'
import demo3 from '../components/sub/demo3'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: login
    },
    {
      path: '/menu',
      name: 'index',
      component: Menu,
      children: [
        {
          path: '/demo1',
          name: 'demo1',
          component: demo1
        },
        {
          path: '/demo2',
          name: 'demo2',
          component: demo2
        },
        {
          path: '/demo3',
          name: 'demo3',
          component: demo3
        }
      ]
    }
  ]
})
